<template>
	<view>
		<block v-if="couponLists.length">
			<block v-for="(item,i) in couponLists" :key="i">
				<yhqItem :item="item" type="useYhq" @getCouponLists="getCouponLists"></yhqItem>
			</block>
		</block>

		<block v-else>
			<noneList></noneList>
		</block>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				couponLists: []
			};
		},
		onLoad(res) {
			this.getCouponLists(res.money)
		},
		onShow() {
			
			
		},
		methods: {
			getCouponLists(money) {
				this.$api.sendRequest({
					url: '/api/coupon/usableCouponList',
					data: {
						money: money
					},
					success: res => {
						this.couponLists = res.data
					}
				})
			}

		}
	}
</script>

<style lang="scss">

</style>
